package com.loansystem.service.admin.impl;

import com.loansystem.bean.user.Loans;
import com.loansystem.bean.user.User;
import com.loansystem.bean.user.User_Loans_VO;
import com.loansystem.bean.user.User_Rule_VO;
import com.loansystem.dao.admin.AdminMapper;
import com.loansystem.service.admin.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    AdminMapper adminMapper;

    @Override
    public List<User_Loans_VO> loansInfo() {
        return adminMapper.loansInfo();
    }

    @Override
    public List<User_Rule_VO> userInfo() {
        return adminMapper.userInfo();
    }

    @Override
    public List<User_Rule_VO> getUserInfo(String user_mail, String user_name) {
        return adminMapper.getUserInfo(user_mail,user_name);
    }

    @Override
    public int updateUserInfo(User user) {
        return adminMapper.updateUserInfo(user);
    }

    @Override
    public int addUserInfo(User user) {
        return adminMapper.addUserInfo(user);
    }

    @Override
    public int deleteUserInfo(Integer user_id) {
        return adminMapper.deleteUserInfo(user_id);
    }

    @Override
    public int updateLoansState(Integer loans_id, Integer loans_state) {
        return adminMapper.updateLoansState(loans_id,loans_state);
    }
}
